<script setup>
  import {ref} from 'vue'
  import applyWaiting from './waiting/applyWaiting.vue'
  import applyWaiting_bs from "./waiting/applyWaiting_backSchool.vue"
  import applySuccess from './waiting/applySuccess.vue'
  import applySuccess_bs from './waiting/applySuccess_backSchool.vue'
  import applyFail from './waiting/applyFail.vue'
  import applyFail_bs from './waiting/applyFail_backSchool.vue'

  let time = ref(0);

  const timeStop = setInterval(() => {
    time.value = time.value + 1;
    console.log(time.value);
    if(time.value == 30){
      clearInterval(timeStop)
    }
  },1000)
</script>

<template>
    <view v-if="time < 5 && time >= 0">
      <apply-waiting></apply-waiting>
    </view>
    <view v-if="time < 10 && time >= 5">
      <apply-success></apply-success>
    </view>
    <view v-if="time < 15 && time >= 10">
      <apply-fail></apply-fail>
    </view>
    <view v-if="time < 20 && time >= 15">
      <apply-waiting_bs></apply-waiting_bs>
    </view>
    <view v-if="time < 25 && time >= 20">
      <apply-success_bs></apply-success_bs>
    </view>
    <view v-if="time <= 30 && time >= 25">
      <apply-fail_bs></apply-fail_bs>
    </view>
</template>

<style scoped>
  #background{
    display: flex;
    justify-content: center;
  }
</style>